﻿// Copyright (c) egmkang wang. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace T1
{
    using System;
    using XServer.SDK;
    using Orleans.TestingHost;

    public class Setup : IDisposable
    {
        static OnceFlag loggerFlag = new OnceFlag();
        public static TestCluster cluster = new TestCluster();

        protected Setup()
        {
            lock (cluster)
            {
                if (cluster.GrainFactory == null) cluster.Deploy();
            }
            loggerFlag.CallOnce(() =>
           {
               LoggerProvider.InitLogger("test", NLog.LogLevel.Trace);
           });
        }

        public void Dispose()
        {
        }
    }
}
